package com.houtai.dao;

import com.houtai.bean.TdCourseComments;
import com.houtai.bean.dto.course.comments.TdCourseCommentsListDto;
import com.houtai.bean.vo.course.comments.TdCourseCommentsList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TdCourseCommentsDao {
    /**
     * @Purpose:    添加课程评价信息
     * @param:      tsArticleComments
     * @Version:    1.0
     * @Author:     li
     * @time:       2019/8/21
     * @return:     void
     */
    void insertTdCourseComments(TdCourseComments tdCourseComments);
    /**
     * @Purpose:    查找课程评价信息
     * @param:      course_id
     * @Version:    1.0
     * @Author:     li
     * @time:       2019/8/21
     * @return:     TdCourseComments
     */
    TdCourseComments findTdCourseComments(@Param("user_id")int user_id, @Param("course_id")int course_id);
    /**
     * @Purpose:    查找学校好评数量
     * @param:      school_id
     * @Version:    1.0
     * @Author:     li
     * @time:       2019/8/21
     * @return:     void
     */
    int findGoodSchoolSize(@Param("school_id")int school_id);
    /**
     * @Purpose:    查找学校评价数量数量
     * @param:      school_id
     * @Version:    1.0
     * @Author:     li
     * @time:       2019/8/21
     * @return:     void
     */
    int findSchoolSize(@Param("school_id")int school_id);
    /**
     * @Purpose:    查找课程好评数量
     * @param:      school_id
     * @Version:    1.0
     * @Author:     li
     * @time:       2019/8/21
     * @return:     void
     */
    int findGoodCourseSize(@Param("course_id")int course_id);
    /**
     * @Purpose:    查找课程评价数量数量
     * @param:      school_id
     * @Version:    1.0
     * @Author:     li
     * @time:       2019/8/21
     * @return:     void
     */
    int findCourseSize(@Param("course_id")int course_id);
    /**
     * @Purpose   查找课程评论列表
     * @param     dto
     * @version   1.0
     * @author    李准
     * @time      2017-08-19
     * @return    List<TdCourseCommentsList>
     */
    List<TdCourseCommentsList> findTdCourseCommentsList(TdCourseCommentsListDto dto);

}
